
file = open(r"E:\python\a.txt", "r")
txt = file.read()
print(txt)
file.close()


with open(r"E:\python\a.txt", "r") as file:
    txt = file.read()
    print(txt)